package com.dody.agile.payment.transaction;

import com.dody.agile.payment.classification.CommissionClassification;
import com.dody.agile.payment.classification.PaymentClassification;
import com.dody.agile.payment.schedule.BiweeklySchedule;
import com.dody.agile.payment.schedule.PaymentSchedule;

/**
 * @author ShiXin
 * @date 2019/4/11 19:57
 * @description agile
 */
public class AddCommissionEmployee extends AddEmployeeTransaction{

    private double salary;

    public AddCommissionEmployee(Integer empId, String name, String address, double salary) {
        super(empId, address, name);
        this.salary = salary;
    }

    @Override
    PaymentClassification getClassification() {
        return new CommissionClassification(salary);
    }

    @Override
    PaymentSchedule getSchedule() {
        return new BiweeklySchedule();
    }
}
